<!--
 /**
* Date: 2022-03-22 15:34
* Desc: 实物产品配置详情
 */
-->
<template>
  <zm-panel :title="titles" class="physical-product-config-detail" :visible.sync="value" @change="close">
    <zm-tabs :list="tabsList" v-model="activitiesTab" label-key="name" name-key="value"></zm-tabs>
    <components :is="activitiesTab" :id="id" :is-form-sale="isFormSale"></components>
    <footer slot="footer">
      <zm-button @click="close" type="default" size="middle">
        取消
      </zm-button>
      <zm-button size="middle" @click="close">
        确认
      </zm-button>
    </footer>
  </zm-panel>
</template>

<script>
import panelMixin from '@/mixins/panelMixin'
import BaseInfo from './components/baseInfo/index.vue'
export default {
  name: 'PhysicalProductConfigDetail',
  components: { BaseInfo },
  mixins: [panelMixin],
  props: {
    id: {
      type: String,
      required: true
    },
    obj: {
      type: Object,
      required: true
    },
    isFormSale: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      tabsList: [
        {
          value: 'BaseInfo',
          name: '基本信息'
        }
      ],
      activitiesTab: 'BaseInfo'
    }
  },
  computed: {
    titles () {
      return this.obj && this.obj.name
    }
  },
  created () { },
  mounted () { },
  methods: {}
}
</script>
